package com.kly.domain.enums;

import lombok.Getter;

/**
 * @author admin
 * @date 2025/3/5
 */
@Getter
public enum ReviewStatusEnum {
    UNREVIEWED(0, "待审核"),
    PASSED(1, "通过"),
    REJECTED(2, "不通过");

    private final Integer value;
    private final String text;

    ReviewStatusEnum(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

    /**
     * 获取枚举对象
     */
    public static ReviewStatusEnum getEnum(Integer value) {
        if (value == null) {
            return null;
        }
        for (ReviewStatusEnum reviewStatusEnum : ReviewStatusEnum.values()) {
            if (reviewStatusEnum.getValue().equals(value)) {
                return reviewStatusEnum;
            }
        }
        return null;
    }
}
